Work around counter cache bug when not selecting the cached column

Dominik Sander 7 years ago
parent
commit
bade1a1a32
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/models/user.rb

+ 1 - 1
app/models/user.rb

@@ -88,6 +88,6 @@ class User < ActiveRecord::Base
88 88
   end
89 89
 
90 90
   def undefined_agents
91
-    agents.where(type: undefined_agent_types).select('id, schedule, type as undefined')
91
+    agents.where(type: undefined_agent_types).select('id, schedule, events_count, type as undefined')
92 92
   end
93 93
 end